package com.auxgroup.hr.front.service.process.impl;

import javax.annotation.Resource;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.auxgroup.hr.front.commons.utils.ObjectFieldUtils;
import com.auxgroup.hr.front.dao.domain.PsCWfTerHdr;
import com.auxgroup.hr.front.dao.repository.PsCWfTerHdrRepository;
import com.auxgroup.hr.front.dozer.IObjectMapper;
import com.auxgroup.hr.front.service.process.WfTerHdrService;

/** 
 * @author lvliuhao 
 * @version 创建时间：2018年5月31日 下午10:00:00 
 * 离职申请流程service
 */
@Service("wfTerHdrService")
public class WfTerHdrServiceImpl implements WfTerHdrService {
	
	@Resource(name = "dozerMapper")
	protected IObjectMapper objectMapper;
	
	@Autowired
	private PsCWfTerHdrRepository psCWfTerHdrRepository;

	/* (non-Javadoc)
	 * @see WfTerHdrService#getWfCerHdr(java.lang.String)
	 */
	@Override
	public PsCWfTerHdr getWfTerHdr(String cTransactionNbr) {
		return psCWfTerHdrRepository.findOne(cTransactionNbr);
	}

	/* (non-Javadoc)
	 * @see WfTerHdrService#save(PsCWfCerHdr)
	 */
	@Override
	public PsCWfTerHdr save(PsCWfTerHdr WfTerHdr) {
		ObjectFieldUtils.handleNullValue(WfTerHdr);
		return psCWfTerHdrRepository.save(WfTerHdr);
	}
	

	
	
}
 